package cn.zyl.demo.simple.controller;

import cn.zyl.demo.common.enums.DateFormatEnum;
import cn.zyl.demo.common.tools.DateTool;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 类说明:简单的spring boot的接口
 *
 * @author wsz
 * @version v1.0
 * @date 2020-07-21
 */
@Component
@RestController
@RequestMapping("/")
public class SimpleIndexController {
    @RequestMapping("")
    public String index(){
        return "Hello Spring Boot Simple!";
    }
    @RequestMapping("now")
    public String now(){
        return DateTool.getNow(DateFormatEnum.y_M_d_H_m_s_1);
    }
}
